-
-
Notifications
You must be signed in to change notification settings - Fork 253
Add video input file support #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've only tested this with Gemini 1.5 Flash and it works. Updating the models and running the tests makes a lot of errors fail. What's the best way to proceed from here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @arnodirlam I'd love to add this to RubyLLM. Do you have the means to test things out with API keys? There's one little thing to change too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should rather be in chat_content_spec.rb
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 228ab17.
Oh and check off the items that you did in the quality check section of the PR. All are required. |
c1bbf45
to
9604320
Compare
dcd8183
to
f8c4655
Compare
…; Update capabilities
I've addressed the remaining points now.
EDIT: Just realized |
Added a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty nice! Just minor changes.
@@ -43,11 +43,12 @@ RubyLLM fixes all that. One beautiful API for everything. One consistent format. | |||
|
|||
```ruby | |||
# Just ask questions | |||
chat = RubyLLM.chat | |||
chat = RubyLLM.chat(model: "gemini-2.0-flash") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not change this.
chat.ask "What's in this image?", with: "ruby_conf.jpg" | ||
chat.ask "What's happening in this video?", with: "presentation.mp4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's call the example video video.mp4
|
||
```ruby | ||
# Ask about a local video file | ||
chat = RubyLLM.chat(model: 'gemini-2.0-flash') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the video model to gemini-2.5-flash
@@ -69,11 +69,12 @@ RubyLLM fixes all that. One beautiful API for everything. One consistent format. | |||
|
|||
```ruby | |||
# Just ask questions | |||
chat = RubyLLM.chat | |||
chat = RubyLLM.chat(model: "gemini-2.0-flash") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not change this.
chat.ask "What's in this image?", with: "ruby_conf.jpg" | ||
chat.ask "What's happening in this video?", with: "presentation.mp4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
video.mp4
@@ -157,6 +157,10 @@ | |||
{ provider: :ollama, model: 'qwen3' } | |||
].freeze | |||
|
|||
VIDEO_MODELS = [ | |||
{ provider: :gemini, model: 'gemini-2.0-flash' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gemini-2.5-flash
Has this been abandoned? I would like this feature. |
@arnodirlam Thank you for this PR. I'm very interested in this feature and I'm willing to resume work on it. For the original authors and maintainers: Is a successor to this PR welcome? |
## What this does Adds video file support to RubyLLM. Supersedes #260, originally authored by @arnodirlam. Thank you for the groundwork. > Maintainers: happy to close this if you prefer waiting for the original PR. ### What changed vs #260 - Rebased on current `main` - Resolved conflicts in README/docs and Gemini capabilities - Addressed PR comment reviews - Included `gemini-2.5-flash` as a video model for tests ## Type of change - [ ] Bug fix - [x] New feature - [ ] Breaking change - [ ] Documentation - [ ] Performance improvement ## Scope check - [x] I read the [Contributing Guide](https://github.com/crmne/ruby_llm/blob/main/CONTRIBUTING.md) - [x] This aligns with RubyLLM's focus on **LLM communication** - [x] This isn't application-specific logic that belongs in user code - [x] This benefits most users, not just my specific use case ## Quality check - [x] I ran `overcommit --install` and all hooks pass - [x] I tested my changes thoroughly - [x] For provider changes: Re-recorded VCR cassettes with `bundle exec rake vcr:record[provider_name]` - [x] All tests pass: `bundle exec rspec` - [x] I updated documentation if needed - [x] I didn't modify auto-generated files manually (`models.json`, `aliases.json`) ## API changes - [ ] Breaking change - [ ] New public methods/classes - [ ] Changed method signatures - [x] No API changes ## Related issues Closes #259 --------- Co-authored-by: Arno Dirlam <[email protected]> Co-authored-by: Carmine Paolino <[email protected]>
What this does
Enables RubyLLM to recognize and handle video files as attachments, in addition to existing support for images, audio, PDFs, and text.
Why?
Type of change
Scope check
Quality check
overcommit --install
and all hooks passmodels.json
,aliases.json
)API changes
Related issues
Fixes #259